<?php
unset($_SESSION['vendor']);
unset($_SESSION['sharing']);
if(!empty($_POST['log']) && isset($_POST['email']) && isset($_POST['password'])) {

	$_SESSION['vendor'] = Vendor::login(trim($_POST['email']), md5(trim($_POST['password'])));
	
	$_SESSION['sharing'] = Sharing::login(trim($_POST['email']), md5(trim($_POST['password'])));
	if((isset($_SESSION['sharing']['id']))&&($_SESSION['sharing']->getVendor())) {
           $_SESSION['vendor'] = $_SESSION['sharing']->getVendor();
       }
	
	
	
		
}

?>